import React from "react";
import {createStyles} from "antd-style";
import {Button, Empty} from "antd";
import {useNavigate} from "react-router";
import {PageList} from "@/AppRouter.tsx";

const useStyles = createStyles(({css, token}) => {
    return {
        container: css`
            width: 100vw;
            height: 100vh;
            display: grid;
            place-content: center;
            gap: 30px;
        `,
    }
})

const EmptyPage: React.FC = () => {
    const {styles} = useStyles()
    const navigate = useNavigate();
    return (
        <div className={styles.container}>
            <Empty description="您访问的页面不存在"/>
            <Button
                onClick={() => {
                    navigate(PageList.HomePage)
                }}
                autoFocus
                type="primary"
            >返回主页</Button>
        </div>
    )
}

export default EmptyPage
